

#include <iostream>

/*

https://blog.csdn.net/xunye_dream/article/details/103828236

*/


using namespace std;

class A {

};

class B : private A {
    int i;
};


class Empty
{
public:
    typedef int TYPENAME;//typedef
    enum color{red,green,yellow};//enum
    void hello(){ cout << "hello" << endl; }//non-virtual 函数
    static int xx;//static 成员变量

};


class HoldAnInt : private Empty
{
public:
    void newFunc()
    {
        hello();
        cout << "new Func" << endl;
    }
private:
    int x;
};


int test_case_2()
{
    cout << sizeof(Empty) << endl;//1.
    cout << sizeof(HoldAnInt) << endl;//4
    HoldAnInt a;
    a.newFunc();// hello newFunc
    getchar();
    return 0;
}

int main() {

    std::cout << "sizeof A " << sizeof(A) << std::endl;
    std::cout << "sizeof B " << sizeof(B) << std::endl;

    test_case_2();

    return 0;
}